import { RegisterPage } from '../root';
import { schema as volunteerSchema } from './volunteer-list';
import { schema as teamSchema } from './team-list';
import { schema as settingsSchema } from './settings';
import * as React from "react";

import {OrgSelector} from '../team/index';

RegisterPage({
    path: 'stars',
    label: '星级认证',
    icon: 'fa fa-briefcase',
    acl: 'star_volunteer:list',
    children: [
        {
            path: '/stars/volunteer',
            url: '/stars/volunteer',
            label: '星级志愿者',
            schema: volunteerSchema,
            acl: 'star_volunteer:list',
        },
        {
            path: '/stars/team',
            label: '星级团队',
            url: '/stars/team',
            acl: 'star_team:list',
            schema: teamSchema
        },
        {
            path: '/stars/setting',
            label: '星级设置',
            url: '/stars/setting',
            acl: 'star_team:list',
            NavComponent: OrgSelector,
            NavComponentTest: ({user}) => user.type == 4,
            schema: settingsSchema
        },
    ]
});
